﻿using MyConvert;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MySQLite.Models
{
    public class BaseModel
    {
        private string _guid = string.Empty;
        public string Guid
        {
            get { return _guid; }
            set { _guid = value; }
        }

        private int _isDelete;
        public int IsDelete
        {
            get { return _isDelete; }
            set { _isDelete = value; }
        }

        private string _createTime = string.Empty;
        public string CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }

        private string _createUserGuid = string.Empty;
        public string CreateUserGuid
        {
            get { return _createUserGuid; }
            set { _createUserGuid = value; }
        }

        private string _createUserNo = string.Empty;
        public string CreateUserNo
        {
            get { return _createUserNo; }
            set { _createUserNo = value; }
        }

        private string _createUserName = string.Empty;
        public string CreateUserName
        {
            get { return _createUserName; }
            set { _createUserName = value; }
        }

        private string _modifyTime = string.Empty;
        public string ModifyTime
        {
            get { return _modifyTime; }
            set { _modifyTime = value; }
        }

        private string _modifyUserGuid = string.Empty;
        public string ModifyUserGuid
        {
            get { return _modifyUserGuid; }
            set { _modifyUserGuid = value; }
        }

        private string _modifyUserNo = string.Empty;
        public string ModifyUserNo
        {
            get { return _modifyUserNo; }
            set { _modifyUserNo = value; }
        }

        private string _modifyUserName = string.Empty;
        public string ModifyUserName
        {
            get { return _modifyUserName; }
            set { _modifyUserName = value; }
        }

        private string _remark = string.Empty;
        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }

        public virtual T ToUIModel<T>() where T : new()
        {
            T t = new T();
            ModelConvert.CopyValue(this, t);
            return t;
        }

    }

}
